package com.kvest.map.mapview.engine.model;

/**
 * Created with IntelliJ IDEA.
 * User: r.belokon
 * Date: 10.05.13
 * Time: 8:45
 * To change this template use File | Settings | File Templates.
 */
public class TileInfo {
    private int x;
    private int y;
    private int zoom;

    public TileInfo(int x, int y, int zoom) {
        this.x = x;
        this.y = y;
        this.zoom = zoom;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getZoom() {
        return zoom;
    }

    public void setZoom(int zoom) {
        this.zoom = zoom;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof TileInfo) {
            return (((TileInfo)obj).x == this.x && ((TileInfo)obj).y == this.y && ((TileInfo)obj).zoom == this.zoom);
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return zoom * 1000000 + x * 1000 + y;
    }
}
